Merged
Conversation
- Use timer.time_entries_overview instead of timer.time_entries when building the 'View time entries' URL in the dashboard. The invalid route name caused BuildError and an error page after stopping the timer, even though the time entry was saved. - Document the fix in CHANGELOG under Unreleased / Fixed.
On viewports <=767px, skip loading Toast UI Editor for the notes field on manual entry and edit timer pages; use a plain textarea instead. Toast UI is heavy and was freezing/crashing mobile Safari and Chrome. Desktop behavior unchanged. Document in CHANGELOG and MOBILE_IMPROVEMENTS.md.
…ng timers (fixes #558) - Enforce scope in timer routes: start_timer (POST), start_timer_for_project (GET), and start_timer_from_template; deny with flash+redirect when project/client not allowed - Add user_can_access_project check in api_start_timer (legacy API), API v1 timer/start, and kiosk start-timer; return 403 with clear error message - Scope dashboard Start Timer modal: load active_projects and active_clients via apply_project_scope_to_model/apply_client_scope_to_model so subcontractors only see assigned options - Document timer start scope in SUBCONTRACTOR_ROLE.md (web, API, kiosk, 403/redirect)
…helpers (Issue #560) - get_overtime_ytd(user): returns overtime from Jan 1 through today - get_overtime_last_12_months(user): returns rolling 12-month overtime - Reuses calculate_period_overtime; no new DB columns
…PI (Issue #560) - Main dashboard: compute and display Overtime (YTD) in Month's Hours card - Analytics: GET /api/analytics/overtime supports period=ytd and start_date/end_date - API: dashboard stats endpoints include overtime_ytd_hours in response
- Workforce dashboard: show Accumulated overtime (YTD) next to Leave Balances - Add get_overtime_leave_type() and validate requested_hours <= YTD for overtime leave - Time-off form: 'Take as paid leave' link, overtime type preset, available hours hint - create_leave_request rejects overtime requests exceeding YTD with clear error
#560) - Migration 136: insert leave type code 'overtime' if not present - Enables workforce 'Take as paid leave' flow without manual admin setup
- Document accumulated overtime (YTD) and where it appears (dashboard, analytics, workforce) - Document take-overtime-as-paid-leave flow, API endpoints, and new helpers - Add migration 136 and test_overtime_leave.py to Testing section; bump version to 1.2.0
…fault break rules (Issue #561) - Migration 137: add time_entries.break_seconds, time_entries.paused_at - Migration 138: add settings break_after_hours_1/2, break_minutes_1/2 (e.g. 6h->30min, 9h->45min)
…d schemas (Issue #561) - TimeEntry: break_seconds, paused_at; pause_timer(), resume_timer(); current_duration_seconds and calculate_duration() account for break - Settings: break_after_hours_1/2, break_minutes_1/2 for default break rules - Repository: create_manual_entry accepts break_seconds - Schemas: break_seconds on TimeEntrySchema, Create, Update
…ervice (Issue #561) - pause_timer(user_id), resume_timer(user_id) in TimeTrackingService - create_manual_entry and update_entry accept break_seconds; duration = (end-start)-break
…dit break (Issue #561) - Web: POST /timer/pause, POST /timer/resume; timer_status returns paused, break_seconds, break_formatted - API v1: POST /api/v1/timer/pause, POST /api/v1/timer/resume - manual_entry: parse break_time (HH:MM), pass break_seconds; prefill on duplicate - edit_timer: parse break_time, pass break_seconds to update_entry; recalc duration - API v1 time entry create/update accept break_seconds
- Dashboard: Pause/Resume buttons, break and Paused badge, elapsed uses break-adjusted duration - Timer page: Pause/Resume/Stop, break display - Floating bar: paused state, Resume on click when paused; use server current_duration when paused - Manual entry: Break field (HH:MM), Suggest button using default break rules - Edit time entry: Break field (HH:MM) for admins
- Add docs/BREAK_TIME_FEATURE.md (timers pause/resume, manual break, API, settings) - CHANGELOG: add entry under [Unreleased] - FEATURES_COMPLETE: Timer Management and Manual Time Entry mention break time - docs/README: link to Break Time feature doc
…olidays (fixes #562) - Backend: WorkforceGovernanceService.delete_period, delete_leave_request, delete_leave_type, delete_holiday with permission and state checks - Web: POST delete routes in workforce blueprint; delete buttons in dashboard for periods (draft/rejected), time-off (draft/submitted/cancelled), leave types list, and company holidays (admin only) - API v1: DELETE endpoints for timesheet-periods, time-off/requests, time-off/leave-types, time-off/holidays (scopes and admin where required) - Desktop: deleteTimesheetPeriod/deleteTimeOffRequest in API client; Delete buttons and handlers in workforce view with confirmation and refresh - Mobile: deleteTimesheetPeriod/deleteTimeOffRequest in API client; Delete in popup menus for periods and time-off requests - Docs: WORKFORCE_DELETE.md, PROJECT_STRUCTURE and API_TOKEN_SCOPES updates
…ssue #555) - Add visible Apply filters button in filter header so users can apply Start/End date and other filters without scrolling; expand panel if collapsed - Keep CSV/PDF export links in sync with current filters: set href from URL on load and update on form change so export (including right-click Open in new tab / Save link as) always uses the filtered date range - Document fix in CHANGELOG under [Unreleased]
…ssue #564) - Mileage: Add GET /mileage/export/csv and /mileage/export/pdf with same filters as list (status, project, client, date range, search). Export buttons in list header; JS builds export URL from current filter form. - Mileage PDF: New app/utils/mileage_pdf.py (ReportLab, landscape A4, totals row for distance and amount). - Per diem: Add Client filter to list (with client-lock/single-client handling). Add GET /per-diem/export/csv and /per-diem/export/pdf. - Per diem PDF: New app/utils/per_diem_pdf.py (same style as mileage). - Export links always use current filters (no need to submit first). - CHANGELOG and docs/import_export/README updated.
The timer blueprint had two view functions named resume_timer, both registering as endpoint 'timer.resume_timer' and causing Flask to raise AssertionError on app load. - Give the 'resume by id' route a unique endpoint: resume_timer_by_id - Rename the view for GET /timer/resume/<timer_id> to resume_timer_by_id - Update templates to use timer.resume_timer_by_id for links with timer_id - Keep timer.resume_timer for POST (resume current paused timer)
Database Migration Validation❌ Migration validation failed! Issues detected:
Please review the migration files and fix the issues before merging. This comment was automatically generated by the Migration Validation workflow. |
❌ CI Test ResultsOverall Status: 2 test suite(s) failed Test Results: 0/7 passed Test Suites:
Commit: 0ce3725 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Brief description of the change and why it's needed.
Type of change
Checklist
pytest).Related issues
Fixes # (issue number, if applicable)
See CONTRIBUTING.md and CHANGELOG.md for guidelines.